package com.why.cachecloud.service.custom;

import com.why.cachecloud.service.custom.alert.DingTalkComponent;
import com.why.cachecloud.service.custom.alert.impl.DefaultDingTalkComponent;
import com.why.cachecloud.service.custom.login.LoginComponent;
import com.why.cachecloud.service.custom.login.impl.DefaultLoginComponent;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by why.developer
 */
@Configuration
public class DefaultCustomConfiguration {

    @Bean("dingTalkComponent")
    @ConditionalOnMissingBean
    public DingTalkComponent dingTalkComponent() {
        return new DefaultDingTalkComponent();
    }

    @Bean("loginComponent")
    @ConditionalOnMissingBean
    public LoginComponent loginComponent() {
        return new DefaultLoginComponent();
    }

}
